<template>
  <el-dialog
    title="查看帮助"
    :visible.sync="dialogData.dialogVisible"
    width="750px"
    @close="closeDialog"
    @open="openDialog"
    :close-on-click-modal="false"
  >
    <div>
      <div class="examine-title"><i class="el-icon-question examine-icon"></i>{{list.title}}</div>
      <div class="examine-content" >
        <i class="el-icon-success examine-icon"></i>
        <div v-html="list.content">
          {{list.content}}
        </div>
      </div>
      <div class="examine-btn">
        <el-button @click="closeDialog">知道了</el-button>
      </div>
    </div>
  </el-dialog>
</template>
<script>
  import * as api from '@/api/platform-setup'

  const defaultList = {
    classificationName: ''
  }

  export default {
    name: 'Detail',
    components: {},
    props: {
      dialogData: {
        type: Object,
        default: function () {
          return {
            dialogVisible: false,
            value: '',
            id: ''
          }
        }
      }
    },
    data () {
      return {
        listLoading: false,
        defaultList,
        list: Object.assign({}, defaultList),
        rules: this.rules,
      }
    },
    methods: {
      /* 重置表单 */
      resetForm () {
        this.list = Object.assign({}, defaultList)
      },
      /* 关闭 */
      closeDialog () {
        this.dialogData.dialogVisible = false
        this.list = Object.assign({}, defaultList)
      },
      /* 打开 */
      openDialog () {
        this.list = JSON.parse(JSON.stringify(this.dialogData.value))
      },
    }
  }
</script>
<style scoped>
  #container {
    width: 700px;
    height: 400px;
    margin: 0 auto;
    margin-bottom: 20px;
  }

  * {
    touch-action: none;
  }

  .examine-icon {
    color: #ff943e;
    font-size: 24px;
    margin-top: 3px;
  }

  .examine-title {
    line-height: 40px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
  }

  .examine-content {
    margin: 15px 0;
    line-height: 30px;
    font-size: 16px;
    padding-left: 28px;
    position: relative;
    text-align: justify;
    max-height: 500px;
    overflow: auto;
  }
   .examine-content .examine-icon {
     position: absolute;
     left: 0;
     top: 0;
     font-size: 22px;
   }
  .examine-content img {
    max-width: 100% !important;
  }
  .examine-btn{
    margin-top: 50px;
    text-align: center;
  }
</style>

